package com.acme.service;

import java.io.PrintStream;

public class NeatPrinter {
	private static final String TITLE_FORMAT = "------ %s ------\n";

	/**
	 * Neatly prints section title to the console.
	 * 
	 * @param title
	 *            title
	 */
	public static void printTitle(String title) {
		printTitle(System.out, title);
	}

	/**
	 * Neatly prints section title to the print stream.
	 * 
	 * @param printStream
	 *            output print stream
	 * @param title
	 *            title
	 */
	public static void printTitle(PrintStream printStream, String title) {
		printStream.printf(TITLE_FORMAT, title);
	}
}
